Integrand size = 23, antiderivative size = 187 \[ \int (d \cos (e+f x))^m (a+b \tan (e+f x))^n \, dx=\frac {\operatorname {AppellF1}\left (1+n,\frac {2+m}{2},\frac {2+m}{2},2+n,\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}},\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right ) \cos ^2(e+f x) (d \cos (e+f x))^m (a+b \tan (e+f x))^{1+n} \left (1-\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}}\right )^{\frac {2+m}{2}} \left (1-\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )^{\frac {2+m}{2}}}{b f (1+n)} \]
[Out]
Time = 0.26 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3596, 3593, 774, 138} \[ \int (d \cos (e+f x))^m (a+b \tan (e+f x))^n \, dx=\frac {\cos ^2(e+f x) (d \cos (e+f x))^m \left (1-\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}}\right )^{\frac {m+2}{2}} \left (1-\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )^{\frac {m+2}{2}} (a+b \tan (e+f x))^{n+1} \operatorname {AppellF1}\left (n+1,\frac {m+2}{2},\frac {m+2}{2},n+2,\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}},\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )}{b f (n+1)} \]
[In]
[Out]
Rule 138
Rule 774
Rule 3593
Rule 3596
Rubi steps \begin{align*} \text {integral}& = \left ((d \cos (e+f x))^m (d \sec (e+f x))^m\right ) \int (d \sec (e+f x))^{-m} (a+b \tan (e+f x))^n \, dx \\ & = \frac {\left ((d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \text {Subst}\left (\int (a+x)^n \left (1+\frac {x^2}{b^2}\right )^{-1-\frac {m}{2}} \, dx,x,b \tan (e+f x)\right )}{b f} \\ & = \frac {\left (\cos ^2(e+f x) (d \cos (e+f x))^m \left (1-\frac {a+b \tan (e+f x)}{a-\frac {b^2}{\sqrt {-b^2}}}\right )^{1+\frac {m}{2}} \left (1-\frac {a+b \tan (e+f x)}{a+\frac {b^2}{\sqrt {-b^2}}}\right )^{1+\frac {m}{2}}\right ) \text {Subst}\left (\int x^n \left (1-\frac {x}{a-\sqrt {-b^2}}\right )^{-1-\frac {m}{2}} \left (1-\frac {x}{a+\sqrt {-b^2}}\right )^{-1-\frac {m}{2}} \, dx,x,a+b \tan (e+f x)\right )}{b f} \\ & = \frac {\operatorname {AppellF1}\left (1+n,\frac {2+m}{2},\frac {2+m}{2},2+n,\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}},\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right ) \cos ^2(e+f x) (d \cos (e+f x))^m (a+b \tan (e+f x))^{1+n} \left (1-\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}}\right )^{\frac {2+m}{2}} \left (1-\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )^{\frac {2+m}{2}}}{b f (1+n)} \\ \end{align*}
Result contains complex when optimal does not.
Time = 23.41 (sec) , antiderivative size = 365, normalized size of antiderivative = 1.95 \[ \int (d \cos (e+f x))^m (a+b \tan (e+f x))^n \, dx=\frac {2 (a-i b) (a+i b) (2+n) \operatorname {AppellF1}\left (1+n,1+\frac {m}{2},1+\frac {m}{2},2+n,\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right ) \cos (e+f x) (d \cos (e+f x))^m (a \cos (e+f x)+b \sin (e+f x)) (a+b \tan (e+f x))^n}{b f (1+n) \left (2 \left (a^2+b^2\right ) (2+n) \operatorname {AppellF1}\left (1+n,1+\frac {m}{2},1+\frac {m}{2},2+n,\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right )+(2+m) \left ((a-i b) \operatorname {AppellF1}\left (2+n,1+\frac {m}{2},2+\frac {m}{2},3+n,\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right )+(a+i b) \operatorname {AppellF1}\left (2+n,2+\frac {m}{2},1+\frac {m}{2},3+n,\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right )\right ) (a+b \tan (e+f x))\right )} \]
[In]
[Out]
\[\int \left (d \cos \left (f x +e \right )\right )^{m} \left (a +b \tan \left (f x +e \right )\right )^{n}d x\]
[In]
[Out]
\[ \int (d \cos (e+f x))^m (a+b \tan (e+f x))^n \, dx=\int { \left (d \cos \left (f x + e\right )\right )^{m} {\left (b \tan \left (f x + e\right ) + a\right )}^{n} \,d x } \]
[In]
[Out]
\[ \int (d \cos (e+f x))^m (a+b \tan (e+f x))^n \, dx=\int \left (d \cos {\left (e + f x \right )}\right )^{m} \left (a + b \tan {\left (e + f x \right )}\right )^{n}\, dx \]
[In]
[Out]
\[ \int (d \cos (e+f x))^m (a+b \tan (e+f x))^n \, dx=\int { \left (d \cos \left (f x + e\right )\right )^{m} {\left (b \tan \left (f x + e\right ) + a\right )}^{n} \,d x } \]
[In]
[Out]
\[ \int (d \cos (e+f x))^m (a+b \tan (e+f x))^n \, dx=\int { \left (d \cos \left (f x + e\right )\right )^{m} {\left (b \tan \left (f x + e\right ) + a\right )}^{n} \,d x } \]
[In]
[Out]
Timed out. \[ \int (d \cos (e+f x))^m (a+b \tan (e+f x))^n \, dx=\int {\left (d\,\cos \left (e+f\,x\right )\right )}^m\,{\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^n \,d x \]
[In]
[Out]